import request from '@/utils/request'

// 类别下拉
export function GetTypeSelectAPI(query) {
    return request({
        url: '/system/awmateria/listThe',
        method: 'GET',
        params: query
    })
}

// 客户列表
export function GetCustomerListAPI(query) {
    return request({
        url: '/order/customer-management/list',
        method: 'GET',
        params: query
    })
}

// 供应商列表
export function GetSupplierListAPI(params) {
    return request({
        url: '/order/supplier-management/list',
        method: 'GET',
        params
    })
}

// 物料原料列表
export function GetAwmateriaListAPI(params) {
    return request({
        url: '/system/awmateria/list',
        method: 'GET',
        params
    })
}

// 物料成品列表
export function GetFinishedListAPI(params) {
    return request({
        url: '/system/finished/list',
        method: 'GET',
        params
    })
}

// 物料半成品列表
export function GetHalfListAPI(params) {
    return request({
        url: '/system/half/list',
        method: 'GET',
        params
    })
}

// 物料辅料列表
export function GetAccessoriesAPI(params) {
    return request({
        url: '/system/accessories/list',
        method: 'GET',
        params
    })
}

// 物料废料列表
export function GetWasteAPI(params) {
    return request({
        url: '/system/waste/list',
        method: 'GET',
        params
    })
}

/**
 * BOM列表
 * @param {pageNum,pageSize,materialCode,materialName,} params
 * @returns res
 */
export function GetBomAPI(params) {
    return request({
        url: '/system/newBom/getOneLevelList',
        method: 'GET',
        params
    })
}

// 列表 查询bom明细信息分页 (待库存量)
export function GetListDetailAPI(params) {
    return request({
        url: '/order/subcontracting-order/detailInventory',
        method: 'get',
        params
    })
}

// 列表获取角色
export function GetRoleListAPI(query) {
    return request({
        url: '/system/role/list',
        method: 'get',
        params: { pageNum: 1, pageSize: 9999 }
    })
}